﻿using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace Matrix.Common
{
   public interface IMatrixManagers : INotifyPropertyChanged
   {
      IMatrix FirstMatrix
      {
         get;
      }

      IMatrix SecondMatrix
      {
         get;
      }

      IMatrix ResultMatrix
      {
         get;
      }

      IEnumerable<IMatrixOperation> Operations
      {
         get;
      }

      IMatrixOperation SelectedOperation
      {
         get;
         set;
      }

      event EventHandler MatrixSizeChanged;
   }

   public interface IMatrix : INotifyPropertyChanged
   {
      IEnumerable<IMatrixElement> Elements
      {
         get;
      }

      bool IsValid
      {
         get;
         set;
      }

      bool IsEditable
      {
         get;
         set;
      }

      int ColumnSize
      {
         get;
         set;
      }

      int RowSize
      {
         get;
         set;
      }

      event EventHandler MatrixSizeChanged;
   }

   public interface IMatrixElement : INotifyPropertyChanged
   {
      double ElementValue
      {
         get;
         set;
      }

      bool IsValid
      {
         get;
         set;
      }

      bool IsEditable
      {
         get;
         set;
      }

      int ColumnPosition
      {
         get;
         set;
      }

      int RowPosition
      {
         get;
         set;
      }
   }

   public interface IMatrixOperation : INotifyPropertyChanged
   {
      IMatrixManagers Manager
      {
         get;
      }

      void Process();

      bool IsValid
      {
         get;
      }

      string OperationName
      {
         get;
      }
   }
}
